﻿<UserControl x:Class="PocoGen.Gui.Presentation.Views.OutputWriterView"
             x:ClassModifier="internal"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" d:DesignWidth="300">
    <UserControl.Resources>
        <Style TargetType="TextBox">
            <Setter Property="Margin" Value="2" />
            <Setter Property="Padding" Value="2" />
        </Style>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="2" />
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="2" />
            <Setter Property="Padding" Value="2" />
        </Style>
    </UserControl.Resources>

    <Border Style="{StaticResource ContentBorder}">
        <StackPanel>
            <DockPanel>
                <Button DockPanel.Dock="Right" Command="{Binding Delete}" ToolTip="Remove">
                    <Image Source="{StaticResource DeleteIcon}" Height="16" />
                </Button>

                <Button DockPanel.Dock="Right" Command="{Binding GeneratePreview}">Preview</Button>

                <Button DockPanel.Dock="Right" Command="{Binding Configure}" ToolTip="Settings...">
                    <Image Source="{StaticResource SettingsIcon}" Height="16" />
                </Button>

                <TextBlock Text="{Binding Name}" VerticalAlignment="Center" FontWeight="Bold" />
            </DockPanel>

            <DockPanel>
                <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center">Filename:</TextBlock>

                <TextBox Text="{Binding FileName, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=true, ValidatesOnDataErrors=true}" />
            </DockPanel>
        </StackPanel>
    </Border>
</UserControl>